package com.uchengwang.ui.cm_ui.uu.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ListView;

import com.uchengwang.R;
import com.uchengwang.ui.base_ui.ui.BaseWithTitleActivity;
import com.uchengwang.ui.cm_ui.uu.adapter.SlideLeftAdapter;
import com.uchengwang.ui.cm_ui.uu.bean.SlideBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by U城网 on 2018/5/19.
 * 查找关系界面
 */

public class FindActivity extends BaseWithTitleActivity implements View.OnClickListener{
    private LinearLayout find_search;
    private ListView find_lv;
    private SlideLeftAdapter slideLeftAdapter;
    private List<SlideBean> slideBeanList;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_find);
        setTitle("找人");

        initView();
    }

    private void initView() {
        find_search = (LinearLayout) findViewById(R.id.find_search);
        find_search.setOnClickListener(this);
        find_lv = (ListView) findViewById(R.id.find_lv);

        initData();
    }

    private void initData(){
        slideBeanList = new ArrayList<>();
        slideBeanList.add(new SlideBean(0, R.drawable.icon_zhoubian, "查看周边朋友", 0, 0));
        slideBeanList.add(new SlideBean(0, R.drawable.icon_guanxi, "查看关系朋友", 0, 0));
        slideBeanList.add(new SlideBean(0, R.drawable.icon_shouji_contact, "添加手机联系人", 0, 0));

        slideLeftAdapter = new SlideLeftAdapter(this, slideBeanList);
        find_lv.setAdapter(slideLeftAdapter);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.find_search:
                Intent intent = new Intent(this, SearchFriendActivity.class);
                startActivity(intent);
                break;
        }
    }
}
